package com.example.rdcproject.ving.notes.entity;

import java.util.ArrayList;
import java.util.List;

public  class WordBook {
    private static WordBook instance = null;
    private String name;
    private List<Word> words = new ArrayList<Word>();

    private WordBook() {
    }

   public  static  WordBook getInstance() {
        if (instance == null) {
            instance = new WordBook();
        }
            return instance;
   }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Word> getWords() {
        return words;
    }

    public void setWords(List<Word> words) {
        this.words = words;
    }

    //增加单词
    public void addWord(Word word) {
        words.add(word);
    }



}

